﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace MT.CustomUserControl.Views.UserControls
{
    /// <summary>
    /// CustomDatePicker.xaml 的交互逻辑
    /// </summary>
    public partial class CustomDatePicker : UserControl
    {
        /// <summary>
        /// 起始时间
        /// </summary>
        public DateTime? StartDate
        {
            get { return (DateTime)GetValue(StartDateProperty); }
            set { SetValue(StartDateProperty, value); }
        }

        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty StartDateProperty =
            DependencyProperty.Register("StartDate", typeof(DateTime), typeof(CustomDatePicker), new PropertyMetadata(DateTime.Now));

        /// <summary>
        /// 终止时间
        /// </summary>
        public DateTime? StopDate
        {
            get { return (DateTime)GetValue(StopDateProperty); }
            set { SetValue(StopDateProperty, value); }
        }

        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty StopDateProperty =
            DependencyProperty.Register("StopDate", typeof(DateTime), typeof(CustomDatePicker), new PropertyMetadata(DateTime.Now));

        public CustomDatePicker()
        {
            InitializeComponent();
        }
    }
}
